package com.design.observer.mouseevent.handler;

import com.design.observer.mouseevent.core.Event;
import com.design.observer.mouseevent.core.EventListener;

/**
 * 观察者
 * @author:         cong zhi
 * @createDate:     2023/8/3 22:07
 * @updateUser:     cong zhi
 * @updateDate:     2023/8/3 22:07
 * @updateRemark:   修改内容
 * @version:        v1.0
 */
public class MouseEventListener implements EventListener {

    @Override
    public void onClick(Event e){
        System.out.println("===========触发鼠标单击事件==========" + "\n" + e);
    }

    @Override
    public void onDoubleClick(Event e){
        System.out.println("===========触发鼠标双击事件==========" + "\n" + e);
    }

    @Override
    public void onUp(Event e){
        System.out.println("===========触发鼠标弹起事件==========" + "\n" + e);
    }

    @Override
    public void onDown(Event e){
        System.out.println("===========触发鼠标按下事件==========" + "\n" + e);
    }

    @Override
    public void onMove(Event e){
        System.out.println("===========触发鼠标移动事件==========" + "\n" + e);
    }

    @Override
    public void onWheel(Event e){
        System.out.println("===========触发鼠标滚动事件==========" + "\n" + e);
    }

    @Override
    public void onOver(Event e){
        System.out.println("===========触发鼠标悬停事件==========" + "\n" + e);
    }

    @Override
    public void onBlur(Event e){
        System.out.println("===========触发鼠标失焦事件==========" + "\n" + e);
    }

    public void onFocus(Event e){
        System.out.println("===========触发鼠标获焦事件==========" + "\n" + e);
    }


}
